package com.example.bt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;

/**
 *
 * @description: 用户实体类
 * @author: WangBlue
 * @create: 2024-03-06 17:44
 **/
@Data
@TableName("user")
public class User {
    @TableId(type = IdType.AUTO )
    private int id;

    @TableField("name")
    private String name;

    @TableField("age")
    private int age;

    @TableField("sex")
    private String sex;

    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


}
